package com.smart.oil.mapper;

import com.smart.oil.entity.SmDept;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface SmDeptMapper {
    int deleteByPrimaryKey(String id);

    int insert(SmDept record);

    int insertSelective(SmDept record);

    SmDept selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(SmDept record);

    int updateByPrimaryKey(SmDept record);

    List<SmDept> selectAll();

    //维护新的层级关系
    int updateRelationCode(@Param("oldStr") String oldStr, @Param("newStr") String newStr, @Param("relationCode") String relationCode);

    List<String> selectChildIds(String relationCode);

    int deletedDepts(Date updateTime, @Param("list") List<String> list);
}